<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户外呼</title>
    <link rel="stylesheet" href="/Public/css/gxxjkefu-normalize.css">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/model.css">
    <link rel="stylesheet" href="/Public/css/pager.css">
    <style>
        body {
            font-size: 12px;
        }

        .user_name {
            cursor: pointer;
            color: black;
        }

        .user_name:hover {
            color: #31b0d5;
        }

        .select_div select {
            width: 20%;
            margin: 20px;
            float: right;
        }

        .notice_info {
            padding: 25px 0 3%;
            line-height: 35px;
            color: #979797;
            float: left;
            width: 100%;
            background: #ffffff;
        }

        .feedback_ul {
            text-align: center;
            margin: 0 auto 50px;
        }

        .feedback_ul li {
            text-align: center;
            display: inline-block;
            margin: 0 30px;
        }

        .feedback_ul li a {
            color: black;
            padding: 0 0 10px;
        }

        .feedback_ul .a_active {
            color: #57bee9;
            border-bottom: solid 2px #57bee9;
        }

        .search_table thead {
            background: #f0f8fa;
            border: none;
        }

        .table {
            color: #000000;
            margin: 0 auto;
            width: 100% !important;
            text-align: center;
        }

        .search_table input {
            background: none;
            border: none;
        }

        .table > thead > tr > th {
            border-bottom: none !important;
            text-align: center !important;
        }

        .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
            border-top: 1px solid #f0f8fa !important;
            text-align: center !important;
        }

        .remark_div {
            color: black;
            height: 340px;
            width: 90%;
            margin: 200px auto 0;
            position: relative;
        }

        .remark_div input {
            position: absolute;
            right: 0;
            bottom: 0;
            background: #ff815a;
            border-radius: 3px;
            border: none;
            color: white;
            margin-top: 20px;
            width: 200px;
            height: 40px;
        }

        .remark_div textarea {
            background: #f5f5f5;
            border: none;
            padding: 1%;
        }
    </style>
</head>
<body>
<div id="main_C" style="float: left;width: 100%" class="animated fadeInRight">
    <div class="title_info">
        <span>用户外呼</span>
    </div>
    <div class="white_bgColor notice_info">
        <!--顶部选项-->
        <ul class="feedback_ul">
            <li><a href="javascript:void(0);" class="a_active">注册未认证</a></li>
            <!--<li><a href="javascript:void(0);">今日需还款</a></li>-->
            <!--<li><a href="javascript:void(0);">明日需还款</a></li>-->
            <!--<li><a href="javascript:void(0);">三个月未借款</a></li>-->
            <!--<li><a href="javascript:void(0);">抢拨用户</a></li>-->

            <!--<li><a href="javascript:void(0);">风控误杀</a></li>-->
            <!--<li><a href="javascript:void(0);">号码调查</a></li>-->
            <!--<li><a href="javascript:void(0);">未注册</a></li>-->
            <!--<li><a href="javascript:void(0);">有借款需求</a></li>-->
            <!--<li><a href="javascript:void(0);" >认证出错用户</a></li>-->
            <!--<li><a href="javascript:void(0);" >微盟渠道未认证</a></li>-->
        </ul>
        <!--注册未认证-->
        <div class="search_table">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>手机号</th>
                    <th>性别</th>
                    <th>注册时间</th>
                    <th>最近备注</th>
                    <!--<th>操作</th>-->
                </tr>
                </thead>
                <tbody id="t_lst1" class="animated fadeInRight">

                </tbody>
            </table>

            <div id="pageone" style="width: 1200px;text-align: center;margin: 100px auto 0">
                <ul class="pagination" id="page1"></ul>
                <div class="pageJump">
                    <span>跳转到</span>
                    <input type="text"/>
                    <span>页</span>
                    <button type="button" class="button"></button>
                </div>
            </div>
        </div>

        <!--今日需还款-->
        <div style="display: none" class="search_table">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>手机号</th>
                    <th>性别</th>
                    <th>还款金额</th>
                    <th>应还款时间</th>
                    <th>还款状态</th>
                    <th>最近备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="t_lst2" class="animated fadeInRight">

                </tbody>
            </table>

            <div id="pagetwo" style="width: 1200px;text-align: center;margin: 100px auto 0">
                <ul class="pagination" id="page2"></ul>
                <div class="pageJump">
                    <span>跳转到</span>
                    <input type="text"/>
                    <span>页</span>
                    <button type="button" class="button"></button>
                </div>
            </div>
        </div>

        <!--明日需还款-->
        <div style="display: none" class="search_table">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>手机号</th>
                    <th>性别</th>
                    <th>还款金额</th>
                    <th>应还款时间</th>
                    <th>还款状态</th>
                    <th>最近备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="t_lst3" class="animated fadeInRight">

                </tbody>
            </table>

            <div id="pagethree" style="width: 1200px;text-align: center;margin: 100px auto 0">
                <ul class="pagination" id="page3"></ul>
                <div class="pageJump">
                    <span>跳转到</span>
                    <input type="text"/>
                    <span>页</span>
                    <button type="button" class="button"></button>
                </div>
            </div>
        </div>

        <!--误杀用户-->
        <div style="display: none" class="search_table">
        <table class="table table-hover">
        <thead>
        <tr>
        <th>姓名</th>
        <th>手机号</th>
        <th>注册时间</th>
        <th>最近备注</th>
        <th>备注时间</th>
        </tr>
        </thead>
        <tbody id="t_lst4" class="animated fadeInRight">


        </tbody>
        </table>

        <div id="pagefour" style="width: 1200px;text-align: center;margin: 100px auto 0">
        <ul class="pagination" id="page4"></ul>
        <div class="pageJump">
        <span>跳转到</span>
        <input type="text"/>
        <span>页</span>
        <button type="button" class="button"></button>
        </div>
        </div>
        </div>

        <!--抢拨用户-->
        <div style="display: none" class="search_table">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>手机号</th>
                    <th>注册时间</th>
                    <!--<th>拨打状态</th>-->
                    <!--<th>备注时间</th>-->
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="t_lst5" class="animated fadeInRight">

                </tbody>
            </table>

            <div id="pagefive" style="width: 1200px;text-align: center;margin: 100px auto 0">
                <ul class="pagination" id="page5"></ul>
                <div class="pageJump">
                    <span>跳转到</span>
                    <input type="text"/>
                    <span>页</span>
                    <button type="button" class="button"></button>
                </div>
            </div>
        </div>

       <!--抢拨未注册-->
        <!--空号调查-->
        <!--<div style="display: none" class="search_table">-->
            <!--<table class="table table-hover">-->
                <!--<thead>-->
                <!--<tr>-->
                    <!--<th>姓名</th>-->
                    <!--<th>手机号</th>-->
                    <!--<th>性别</th>-->
                    <!--<th>注册时间</th>-->
                    <!--<th>最近备注</th>-->
                    <!--<th>操作</th>-->
                <!--</tr>-->
                <!--</thead>-->
                <!--<tbody id="t_lst3" class="animated fadeInRight">-->


                <!--</tbody>-->
            <!--</table>-->

            <!--<div id="pagethree" style="width: 1200px;text-align: center;margin: 100px auto 0">-->
                <!--<ul class="pagination" id="page3"></ul>-->
                <!--<div class="pageJump">-->
                    <!--<span>跳转到</span>-->
                    <!--<input type="text"/>-->
                    <!--<span>页</span>-->
                    <!--<button type="button" class="button"></button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->

        <!--未注册-->
        <!--<div style="display: none" class="search_table">-->
            <!--<table class="table table-hover">-->
                <!--<thead>-->
                <!--<tr>-->
                    <!--<th>手机号</th>-->
                    <!--<th>通话状态</th>-->
                    <!--<th>通话时长(秒)</th>-->
                    <!--<th>最近备注</th>-->
                    <!--<th>备注时间</th>-->
                <!--</tr>-->
                <!--</thead>-->
                <!--<tbody id="t_lst4" class="animated fadeInRight">-->

                <!--</tbody>-->
            <!--</table>-->

            <!--<div id="pagefour" style="width: 1200px;text-align: center;margin: 100px auto 0">-->
                <!--<ul class="pagination" id="page4"></ul>-->
                <!--<div class="pageJump">-->
                    <!--<span>跳转到</span>-->
                    <!--<input type="text"/>-->
                    <!--<span>页</span>-->
                    <!--<button type="button" class="button"></button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->

        <!--未注册 有借款需求-->
        <!--<div style="display: none" class="search_table">-->
            <!--<table class="table table-hover">-->
                <!--<thead>-->
                <!--<tr>-->
                    <!--<th>手机号</th>-->
                    <!--<th>通话状态</th>-->
                    <!--<th>通话时长(秒)</th>-->
                    <!--<th>最近备注</th>-->
                    <!--<th>备注时间</th>-->
                <!--</tr>-->
                <!--</thead>-->
                <!--<tbody id="t_lst5" class="animated fadeInRight">-->

                <!--</tbody>-->
            <!--</table>-->

            <!--<div id="pagefive" style="width: 1200px;text-align: center;margin: 100px auto 0">-->
                <!--<ul class="pagination" id="page5"></ul>-->
                <!--<div class="pageJump">-->
                    <!--<span>跳转到</span>-->
                    <!--<input type="text"/>-->
                    <!--<span>页</span>-->
                    <!--<button type="button" class="button"></button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->

        <!--认证出错用户-->
        <!--<div style="display: none" class="search_table">-->
            <!--<table class="table table-hover">-->
                <!--<thead>-->
                <!--<tr>-->
                    <!--<th>手机号</th>-->
                    <!--<th>通话状态</th>-->
                    <!--<th>通话时长(秒)</th>-->
                    <!--<th>最近备注</th>-->
                    <!--<th>备注时间</th>-->
                <!--</tr>-->
                <!--</thead>-->
                <!--<tbody id="t_lst6" class="animated fadeInRight">-->

                <!--</tbody>-->
            <!--</table>-->
            <!--<div id="pagesix" style="width: 1200px;text-align: center;margin: 100px auto 0">-->
                <!--<ul class="pagination" id="page6"></ul>-->
                <!--<div class="pageJump">-->
                    <!--<span>跳转到</span>-->
                    <!--<input type="text"/>-->
                    <!--<span>页</span>-->
                    <!--<button type="button" class="button"></button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->

        <!--渠道未认证-->
        <!--<div style="display: none" class="search_table">-->
            <!--<table class="table table-hover">-->
                <!--<thead>-->
                <!--<tr>-->
                    <!--<th>手机号</th>-->
                    <!--<th>通话状态</th>-->
                    <!--<th>通话时长(秒)</th>-->
                    <!--<th>最近备注</th>-->
                    <!--<th>调查员</th>-->
                    <!--<th>备注时间</th>-->
                <!--</tr>-->
                <!--</thead>-->
                <!--<tbody id="t_lst7" class="animated fadeInRight">-->

                <!--</tbody>-->
            <!--</table>-->
            <!--<div id="pageseven" style="width: 1200px;text-align: center;margin: 100px auto 0">-->
                <!--<ul class="pagination" id="page7"></ul>-->
                <!--<div class="pageJump">-->
                    <!--<span>跳转到</span>-->
                    <!--<input type="text"/>-->
                    <!--<span>页</span>-->
                    <!--<button type="button" class="button"></button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
    </div>
</div>
</div>
<script src="/Public/js/jquery-3.2.1.js"></script>
<script src="/Public/js/bootstrap.min.js"></script>

<script src="/Public/js/pager.js"></script>
<script src="/Public/js/layer/layer.js"></script>
<script src="/Public/js/layui/layui.js"></script>

<script>

    //dadian
    //拨打电话给用户
    function call_user(mobile) {
        window.parent.get_user(mobile);
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });
//        var mobile = document.getElementById("mobile").innerText;
        var url = "<{$SERVER_NAME}>/AntiUser/call";
//        var vid = empty_vid();
//        if (vid == false) {
//            layer.close(index);
//            return false;
//        }

        layer.alert("确认外呼", {title: '提示框', icon: 3}, function (index) {
            $.post(url, {phone: mobile}, function (data) {
                if (data.code = '1001') {
                    var obj = data.result;
                    if (obj.Succeed == true) {

                    } else {
                        layer.alert(obj.Succeed, {title: '提示框', icon: 2});
                    }

                } else {
                    layer.alert(data.result, {title: '提示框', icon: 2});
                }

                layer.close(index);
            });
            layer.close(index);
        });
        layer.close(index);
    }
    //调用父方法
    function user_info(mobile) {
        window.parent.get_user(mobile);
    }

    //注册未认证
    function nocert(page) {
        var url = "<{$SERVER_NAME}>/GoTravel/noCertList";
        $.post(url, {page: page}, function (data) {
            console.log('1111111111111111', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;

                if (data.count <= 10) {
                    $('#pageone').hide();
                } else {
                    $('#pageone').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page1'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        nocert(n);
                    }
                });

                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                        " <td>" + obj[i].user_mobile + "</td>" +
                        "<td>" + obj[i].sex + "</td>" +
                        "<td>" + obj[i].ctime + "</td> " +
                        "<td>" + obj[i].mark + "</td> " +
//                        "<td><input class='remark_btn blue_color' type='button' value='备注'  onclick=remark('" + obj[i].vid + "')  /> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst1").innerHTML = s;

            } else {

            }
        });
    }

    //空号调查
    function phone_check(page) {

        var url = "<{$SERVER_NAME}>/TempTask/phone_check";
        $.post(url, {page: page}, function (data) {
//            console.log('1111111111111111', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;

                if (data.count <= 10) {
                    $('#pagethree').hide();
                } else {
                    $('#pagethree').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);

                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page3'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        phone_check(n);
                    }
                });
                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                        " <td>" + obj[i].user_mobile + "</td>" +
                        "<td>" + obj[i].sex + "</td>" +
                        "<td>" + obj[i].ctime + "</td> " +
                        "<td>" + obj[i].content + "</td> " +
                        "<td><input class='remark_btn blue_color' type='button' value='备注'  onclick=remark('" + obj[i].mobile + "',1) /> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst3").innerHTML = s;
            } else {

            }
        });
    }

    //今日需还款列表
    function today_pay(page,index) {

        var url = "<{$SERVER_NAME}>/TempTask/today_pay";
        $.post(url, {page: page,index:index}, function (data) {
//            console.log('1111111111111111', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;

                if (data.count <= 10) {
                    $('#pagetwo').hide();
                } else {
                    $('#pagetwo').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page2'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        today_pay(n,index);
                    }
                });

                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                        " <td>" + obj[i].user_mobile + "</td>" +
                        "<td>" + obj[i].sex + "</td>" +
                        "<td>" + obj[i].repay_money + "</td> " +
                        "<td>" + obj[i].repay_time + "</td> " +
                        "<td>" + obj[i].status + "</td> " +
                        "<td>" + obj[i].remark + "</td> " +
                        "<td><input class='remark_btn blue_color' type='button' value='备注'  onclick=remark('" + obj[i].mobile + "',2)  /> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst2").innerHTML = s;
            } else {


            }
        });
    }

    //明日需还款列表
    function tomorrow_pay(page,index) {

        var url = "<{$SERVER_NAME}>/TempTask/today_pay";
        $.post(url, {page: page,index:index}, function (data) {
//            console.log('1111111111111111', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;

                if (data.count <= 10) {
                    $('#pagethree').hide();
                } else {
                    $('#pagethree').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page3'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        tomorrow_pay(n,index);
                    }
                });

                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                        " <td>" + obj[i].user_mobile + "</td>" +
                        "<td>" + obj[i].sex + "</td>" +
                        "<td>" + obj[i].repay_money + "</td> " +
                        "<td>" + obj[i].repay_time + "</td> " +
                        "<td>" + obj[i].status + "</td> " +
                        "<td>" + obj[i].remark + "</td> " +
                        "<td><input class='remark_btn blue_color' type='button' value='备注'  onclick=remark('" + obj[i].mobile + "',2)  /> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst3").innerHTML = s;
            } else {


            }
        });
    }

    //风控误杀
    function fk_err(page) {
        var url = "<{$SERVER_NAME}>/TempTask/fk_err_user";
        $.post(url, {page: page}, function (data) {
            console.log('ddddd', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;
                if (data.count <= 10) {
                    $('#pagefour').hide();
                } else {
                    $('#pagefour').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page4'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        fk_err(n);
                    }
                });
                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                        " <td>" + obj[i].user_mobile + "</td>" +
                        "<td>" + obj[i].ctime + "</td> " +
                        "<td>" + obj[i].content + "</td> " +
                        "<td>" + obj[i].content_ctime + "</td> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst4").innerHTML = s;
            } else {

            }
        });
    }

    //未注册号码==暂废
    function un_register(page) {
        var url = "<{$SERVER_NAME}>/TempTask/un_register";
        $.post(url, {page: page,index:4}, function (data) {
            console.log('ddddd', data);
            if (data.code == '1001') {

                var obj = data.data;
                var s = "";
                var len = obj.length;
                if (data.count <= 10) {
                    $('#pagefour').hide();
                } else {
                    $('#pagefour').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page4'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        un_register(n);
                    }
                });
                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=call_user('" + obj[i].phone + "')>" + obj[i].mobile + "</a></td> " +
                        " <td>" + obj[i].state + "</td>" +
                        "<td>" + obj[i].time_long + "</td>" +
                        "<td>" + obj[i].content + "</td> " +
                        "<td>" + obj[i].ctime + "</td> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst4").innerHTML = s;
            } else {

            }
        });
    }

    //有借款需求号码
    function need_borrow(page) {
        var url = "<{$SERVER_NAME}>/TempTask/un_register";
        $.post(url, {page: page,index:5}, function (data) {
            console.log('ddddd', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;
                if (data.count <= 10) {
                    $('#pagefive').hide();
                } else {
                    $('#pagefive').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page5'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        need_borrow(n);
                    }
                });
                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=call_user('" + obj[i].phone + "')>" + obj[i].mobile + "</a></td> " +
                        " <td>" + obj[i].state + "</td>" +
                        "<td>" + obj[i].time_long + "</td>" +
                        "<td>" + obj[i].content + "</td> " +
                        "<td>" + obj[i].ctime + "</td> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst5").innerHTML = s;
            } else {

            }
        });
    }

    //认证出错号码
    function wrong_user(page) {
        var url = "<{$SERVER_NAME}>/TempTask/wrong_user";
        $.post(url, {page: page,index:5}, function (data) {
            console.log('ddddd', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;
                if (data.count <= 10) {
                    $('#pagesix').hide();
                } else {
                    $('#pagesix').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page6'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        wrong_user(n);
                    }
                });
                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].user_mobile + "</a></td> " +
                        " <td>" + obj[i].state + "</td>" +
                        "<td>" + obj[i].time_long + "</td>" +
                        "<td>" + obj[i].content + "</td> " +
                        "<td>" + obj[i].ctime + "</td> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst6").innerHTML = s;
            } else {

            }
        });
    }

    //渠道未认证号码
    function channel_user(page) {
        var url = "<{$SERVER_NAME}>/TempTask/channel_user";
        $.post(url, {page: page,index:5}, function (data) {
            console.log('ddddd', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;
                if (data.count <= 10) {
                    $('#pageseven').hide();
                } else {
                    $('#pageseven').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page7'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        channel_user(n);
                    }
                });
                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].user_mobile + "</a></td> " +
                        " <td>" + obj[i].state + "</td>" +
                        "<td>" + obj[i].time_long + "</td>" +
                        "<td>" + obj[i].content + "</td> " +
                        "<td>" + obj[i].admin + "</td> " +
                        "<td>" + obj[i].ctime + "</td> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst7").innerHTML = s;
            } else {

            }
        });
    }

    //抢拨用户
    function kf_snatch(page) {
        var url = "<{$SERVER_NAME}>/TempTask/kf_snatch";
        $.post(url, {page: page}, function (data) {
            console.log('ddddde', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;
                if (data.count <= 10) {
                    $('#pagefive').hide();
                } else {
                    $('#pagefive').show();
                }
                sessionStorage.setItem('temptask_total', data.tol);
                /*分页*/
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page5'),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('temptask_page', n);
                        kf_snatch(n);
                    }
                });

                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                        " <td>" + obj[i].user_mobile + "</td>" +
                        "<td>" + obj[i].ctime + "</td> " +
                        "<td><input class='remark_btn blue_color' type='button' value='外呼'  onclick=call_out('" + obj[i].mobile + "')  /> " +
                        "</td>" +
                        " </tr>";
                }
                document.getElementById("t_lst5").innerHTML = s;
            } else {

            }
        });
    }
    //确认外呼
    function call_out(mobile) {

        user_info(mobile);
        console.log('momomo',mobile);
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });

        //检查通话
        $.post('<{$SERVER_NAME}>/TempTask/check_call',{mobile:mobile},function (data) {
            if(data.code=='1001'){
                layer.alert(data.result, {title: '提示框', icon: 3});
                layer.close(index);
                return;
            }
        });
        var url = "<{$SERVER_NAME}>/AntiUser/call";
        if (mobile == "") {
            return false;
        }
        layer.alert("确认外呼", {title: '提示框', icon: 3}, function (index) {
            $.post(url, {phone: mobile}, function (data) {
                var  call_id=data.action_id;
                $.post('<{$SERVER_NAME}>/TempTask/click_call',{mobile:mobile,call_id:call_id},function (data) {
                });
                layer.close(index);
            });
            layer.close(index);
        });
        layer.close(index);
    }

    //原外包用户调查
    var url = "<{$SERVER_NAME}>/Outbound/get_survey";
    function get_survey(page, outbound_type, outbound_status) {
        $.post(url, {page: page, type: outbound_type, type_status: outbound_status}, function (data) {
            console.log('1111111111111111', data);
            if (data.code == '1001') {
                var obj = data.data;
                var s = "";
                var len = obj.length;
                console.log('32232', len);
                if (outbound_type == 1) {
                    var page_id = "#page1";
                    var page_div = "#pageone";
                } else if (outbound_type == 2) {
                    var page_id = "#page2";
                    var page_div = "#pagetwo";
                } else if (outbound_type == 3) {
                    var page_id = "#page3";
                    var page_div = "#pagethree";
                } else if (outbound_type == 4) {
                    var page_id = "#page4";
                    var page_div = "#pagefour";
                }

                if (data.count <= 10) {
                    $(page_div).hide();
                } else {
                    $(page_div).show();
                }
                sessionStorage.setItem('outbound_total', data.total);

                /*分页*/
                Page({
                    num: data.total,					//页码数
                    startnum: page,				//指定页码
                    elem: $(page_id),		//指定的元素
                    callback: function (n) {	//
                        sessionStorage.setItem('outbound_page', n);
                        $.post(url, {page: n, type: outbound_type, type_status: outbound_status}, function (data) {
                            console.log('7878787', data);
                            if (data.code == '1001') {
                                var obj = data.data;
                                var s = "";
                                var len = obj.length;
                                console.log('32232', data.total);
                                for (var i = 0; i < len; i++) {
                                    s += " <tr> " +
                                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                                        " <td>" + obj[i].user_mobile + "</td>" +
                                        " <td>" + obj[i].mobilefirm + "</td>" +
                                        " <td>" + obj[i].sex + "</td> " +
                                        "<td class='red_color'>" + "查看认证 " + "</td>" +
                                        " <td>" + obj[i].call_user_level + "</td> " +
                                        "<td>" + obj[i].ctime + "</td>" +
                                        "<td>" + obj[i].feedback_content + "</td>" +
                                        " <td> <input class='remark_btn blue_color' type='button' value='备注'  onclick=remark('" + obj[i].vid + "') />" +
                                        "</td>" +
                                        " </tr>";
                                }
                                if (outbound_type == 1) {
                                    document.getElementById("t_lst1").innerHTML = s;
                                } else if (outbound_type == 2) {
                                    document.getElementById("t_lst2").innerHTML = s;
                                } else if (outbound_type == 3) {
                                    document.getElementById("t_lst3").innerHTML = s;
                                } else if (outbound_type == 4) {
                                    document.getElementById("t_lst4").innerHTML = s;
                                }
                            }
                        });
                    }
                });
                for (var i = 0; i < len; i++) {
                    s += " <tr> " +
                        "<td> <a class='user_name' onclick=user_info('" + obj[i].mobile + "')>" + obj[i].truename + "</a></td> " +
                        " <td>" + obj[i].user_mobile + "</td>" +
                        " <td>" + obj[i].mobilefirm + "</td> " +
                        "<td>" + obj[i].sex + "</td>" +
                        " <td class='red_color'>" + "查看认证 " + "</td>" +
                        "<td>" + obj[i].call_user_level + "</td> " +
                        "<td>" + obj[i].ctime + "</td> " +
                        "<td>" + obj[i].feedback_content + "</td> " +
                        "<td><input class='remark_btn blue_color' type='button' value='备注'  onclick=remark('" + obj[i].vid + "')  /> " +
                        "</td>" +
                        " </tr>";
                }
                if (outbound_type == 1) {
                    document.getElementById("t_lst1").innerHTML = s;
                } else if (outbound_type == 2) {
                    document.getElementById("t_lst2").innerHTML = s;
                } else if (outbound_type == 3) {
                    document.getElementById("t_lst3").innerHTML = s;
                } else if (outbound_type == 4) {
                    document.getElementById("t_lst4").innerHTML = s;
                }
            } else {
            }
        });
    }
    //end
    /*备注*/
    $(document).ready(function () {
        $(".remark_btn").click(function () {
            $(".remark_div").fadeToggle(500);
        });
    });

    //选项卡切换
    $(document).ready(function () {
        $(".feedback_ul li").click(function () {
            $(".search_table").hide().eq($(this).index()).show();
            $(".feedback_ul").find("li a").removeClass("a_active");
            $(this).children("a").addClass("a_active");

            var index = $(this).index() + 1;//获取索引
            sessionStorage.setItem("temptask_type", index - 1);
            sessionStorage.setItem('temptask_page', 1);
            switch (index) {
                case 1:
                    nocert(1);
                    break;
                case 2:
                    today_pay(1,2);
                    break;
                case 3:
                    tomorrow_pay(1,3);
//                    phone_check(1);
                    break;
                case 4:
                    fk_err(1);
//                    un_register(1);
                    break;
                case 5:
                    kf_snatch(1);
                    break;
                case 6:
                        wrong_user(1);
                    break;

                case 7:
                        channel_user(1);
                    break;
            }
        });
//        //  返回前的页面
        var tab_index = parseInt(sessionStorage.getItem('temptask_type'));
        var page = parseInt(sessionStorage.getItem('temptask_page'));
        var survey_total = parseInt(sessionStorage.getItem('temptask_total'));
        console.log('00000tab_index', tab_index);
        console.log('00000page', page);
        console.log('00000survey_total', survey_total);
        if (tab_index >= 0 || page >= 0) {
            if (tab_index == '' || tab_index == null) {
                tab_index = 0;
            }
            if (page == '' || page == null) {
                page = 1;
            }
            $(".search_table").hide().eq(tab_index).show();
            $(".feedback_ul").find("li a").removeClass("a_active");
            $(".feedback_ul li a").eq(tab_index).addClass("a_active");
            var type_status = $("#type_status").children('option:selected').val();

            switch (tab_index + 1) {
                case 1:
                    nocert(page);
                    break;
                case 2:
                    today_pay(page,2);
                    break;
                case 3:
                    tomorrow_pay(page,3);
//                    phone_check(page);
                    break;
                case 4:
                    fk_err(page);
//                    un_register(page);
                    break;
                case 5:
                    kf_snatch(page);
                    break;
                case 6:
                        wrong_user(page);
                    break;
                case 7:
                        channel_user(page);
                    break;

            }

        } else {
            nocert(1);
        }

    });

    //备注
    function remark(mobile, type) {

        console.log('7777', mobile);
        layer.open({
            title: '备注',
            type: 2,
            area: ['80%', '70%'],
            maxmin: true,
            offset: '100px',
            content: '<{$SERVER_NAME}>/TempTask/mark.html?mobile=' + mobile + '&type=' + type,
            success: function (layero) {
                layero.find('.layui-layer-min').remove();
            }
        });
    }


</script>

</body>
</html>